import { defineStore } from "pinia";
import { ref } from "vue";
import { reqGetUserCode } from "../api/register/register"

export const registerStore = defineStore("register", () => {
    //code
    const code = ref('');
    //获取首页推荐数据
    const getUserCode = async (phone: any) => {
        let result = await reqGetUserCode(phone);
        if (result.code == 200) {
            code.value = result.data
        }


    }
    return { getUserCode, code }
})